import * as VueRouter from 'vue-router'


const routes = [
    { path: '/', redirect: '/login' },
    {
        path: '/login', component: () => import('../view/login.vue'),
        // meta: {
        //     isLogin: false
        // }


    },
    {
        path: '/home', component: () => import('../view/home.vue'), redirect: '/home/index',

        children: [
            { path: '/home/index', name: "index", meta: { title: '首页' }, component: () => import('../view/index.vue') },
            { path: '/home/orderDetails', name: "orderDetails", meta: { title: '订单详情' }, component: () => import('../view/orderDetails.vue') },
            { path: '/home/membersManage', name: "membersManage", meta: { title: '会员管理' }, component: () => import('../view/membersManage.vue') },
            { path: '/home/orderManage', name: "orderManage", meta: { title: '订单管理' }, component: () => import('../view/orderManage.vue') },
            { path: '/home/klaeManage', name: "klaeManage", meta: { title: '商品管理' }, component: () => import('../view/klaeManage.vue'), },
            { path: '/home/contTen', name: "contTen", meta: { title: '商品分类' }, component: () => import('../view/contTen.vue') },
            { path: '/home/AddFoods', name: "AddFoods", meta: { title: '添加商品' }, component: () => import('../view/AddFoods.vue') },
            { path: '/home/MarkGl', name: "MarkGl", meta: { title: '营销管理' }, component: () => import('../view/MarkGl.vue'), },
            { path: '/home/Special', name: "Special", meta: { title: '特价活动' }, component: () => import('../view/Special.vue') },
            { path: '/home/exchange', name: "exchange", meta: { title: '爆款兑换' }, component: () => import('../view/exchange.vue') },
        ]
    }


]

const router = VueRouter.createRouter({
    history: VueRouter.createWebHashHistory(),
    routes,
})

export default router;